//package com.jic.manager.controller.rest.conf;
//
//import com.jic.common.base.vo.RestResult;
//import com.jic.conf.api.rest.SysProvinceCityManangeRestApi;
//import com.jic.manager.entity.SysProvinceCity;
//import com.jic.conf.response.SysProvinceCityResponse;
//import com.jic.manager.enums.ResponseCode;
//import com.jic.manager.exception.AppRuntimeException;
//import com.jic.manager.service.SysProvinceCityService;
//import io.swagger.annotations.ApiOperation;
//import lombok.extern.slf4j.Slf4j;
//import org.g4studio.core.metatype.Dto;
//import org.g4studio.core.metatype.impl.BaseDto;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.List;
//
//
///**
// * @author: MJ
// * @date: 2020-01-09
// * @remark: BBC接口 会员收藏列表
// */
//@Slf4j
//@RestController
//@RequestMapping("/apiSysProvinceCity")
//public class ApiSysProvinceCityController implements SysProvinceCityManangeRestApi {
//
//
//    @Autowired
//    SysProvinceCityService sysProvinceCityService;
//
//    /**
//     * BBC接口  店铺/商品 收藏、取消收藏
//     * @param
//     * @return
//     */
//    @ApiOperation(value = "省市区")
//    @ResponseBody
//    @RequestMapping("/getProvinceCityList")
//    @Override
//    public RestResult<List<SysProvinceCityResponse>> getProvinceCityList() {
//        RestResult restResult = new RestResult<>();
//        try {
//            Long level = 0l;
//            List<SysProvinceCity> provinceList = sysProvinceCityService.queryByLevel(level);
//            level = 1l;
//            List<SysProvinceCity> cityList = sysProvinceCityService.queryByLevel(level);
//            level = 2l;
//            List<SysProvinceCity> regionList = sysProvinceCityService.queryByLevel(level);
//            Dto resultMap = new BaseDto();
//            resultMap.put("provinceList",provinceList);
//            resultMap.put("cityList",cityList);
//            resultMap.put("regionList",regionList);
//            restResult=RestResult.success(resultMap);
////            for(Dto province:provinceList){
////
////                if(resultMap.containsKey(province.getAsString("pid"))){
////                    resultMap.getAsList(city.getAsString("pid")).add(city);
////                }else{//map中不存在，新建key，用来存放数据
////                    List tmpList = new ArrayList();
////                    tmpList.add(city);
////                    resultMap.put(city.getAsString("pid"), tmpList);
////                }
////            }
//        } catch (Exception e) {
//            log.error("异常",e);
//            throw new AppRuntimeException(ResponseCode.EXCEPTION);
//        }
//        return restResult;
//    }
//}
